#ifndef BFISH_H
#define BFISH_H

#include "encryption.h"

class BlowfishEncryption : public Encryption
{
	public:
		BlowfishEncryption() { }

		// returns amount encoded (len + any necessary encryption bytes)
		//
		int32 encode(uint8* src, int32 len);
		int32 encode(uint8* src, uint8* dst, int32 len);

		// returns amount decoded (len + any necessary encryption bytes)
		//
		int32 decode(uint8* src, int32 len);
		int32 decode(uint8* src, uint8* dst, int32 len);

		// BlowfishEncryption specific methods.
		//
		int32 encode(uint8* src, uint8* dst, int32 len, uint8* key,
				uint8 keylen, uint8* ivec, uint8 iveclen);
		int32 decode(uint8* src, uint8* dst, int32 len, uint8* key,
				uint8 keylen, uint8* ivec, uint8 iveclen);

	#ifndef BUILDING_COM_PROJECTS
		String EncryptCredential(const String& );
		String DecryptCredential(const String& );

        // General purpose helper methods
        static String EncryptString(const wchar_t* szValue);
        static String EncryptUInt32(uint32 nValue);
        static String DecryptString(const wchar_t* szValue);
        static uint32 DecryptUInt32String(const wchar_t* szValue);
	#endif
};

#endif
